from pydantic import BaseModel, Field


# 根据开发单元获取储层单元
class ReservoirParam(BaseModel):
    devUnits: list = Field(title="开发单元")


class UpdateDevParam(BaseModel):
    add: list = Field(title="添加单元", default=[{'DvpUnit_Name': '##', "Belong_DvpUnit_Name": '#', 'Remark': '#'}])
    delete: list = Field(title="删除单元", default=[{"DvpUnit_ID": 1}])
    update: list = Field(title="修改单元",
                         default=[{"DvpUnit_ID": 1, 'DvpUnit_Name': '##', "Belong_DvpUnit_Name": '#', 'Remark': '#'}])


class UpdateResevoirParam(BaseModel):
    add: list = Field(title="添加", default=[
        {'Reservoir_Name': '##', "Layer_Name": '#', 'Belong_Dev_unit': '#', 'Reservoir_Type': '#',
         'Fluid_Type': '#', 'Space_Type': '#', 'Permeate_Type': '#', 'Pressure_Type': '#', 'Rock_Type': '#',
         'Remark': '#', 'Temperature_Type':'#'}])
    delete: list = Field(title="删除", default=[{"Reservoir_ID": 1}])
    update: list = Field(title="修改",
                         default=[
                             {'Reservoir_IDe': 1, 'Reservoir_Name': '##', "Layer_Name": '#', 'Belong_Dev_unit': '#',
                              'Reservoir_Type': '#',
                              'Fluid_Type': '#', 'Space_Type': '#', 'Permeate_Type': '#', 'Pressure_Type': '#',
                              'Rock_Type': '#',
                              'Remark': '#', }])


class UpdatePitParam(BaseModel):
    add: list = Field(title="添加", default=[
        {'Well_Name': '##', "GeoCoordX": '#', 'GeoCoordY': '22', 'Belong_Unit_Name': '12', 'Remark': '#', }])
    delete: list = Field(title="删除", default=[{"Well_ID": 1}])
    update: list = Field(title="修改",
                         default=[
                             {'Well_Name': '##', "GeoCoordX": '#', 'GeoCoordY': '#', 'Belong_Unit_Name': '#',
                              'Remark': '#', }])


class UpdateCoreParam(BaseModel):
    add: list = Field(title="添加", default=[
        {'Parameter_Ecode': '##', "Parameter_Name": '#', 'Parameter_UOM_Name': 'dm'}])
    delete: list = Field(title="删除", default=[{"Parameter_Ecode": 1}])
    update: list = Field(title="修改",
                         default=[
                             {'Parameter_Ecode': '##', "Parameter_Name": '#', 'Parameter_UOM_Name': 'dm'}])


class UpdateCoreDataList(BaseModel):
    add: list = Field(title="添加", default=[
        {'Core_ID': '##', "Core_Name": '#', 'Parameter_Code': 'Parameter_Value'}])
    delete: list = Field(title="删除", default=[{'Core_ID': 1}])
    update: list = Field(title="修改",
                         default=[
                             {'Core_ID': '##', "Core_Name": '#', 'Parameter_Code': 'Parameter_Value'}])


class UpdateCoreBasic(BaseModel):
    add: list = Field(title="添加", default=[
        {'Core_Name': '##', "Belong_Well_Name": '#', 'Fetch_Time': '2023-07-05', 'Remark': '#'}])
    delete: list = Field(title="删除", default=[{"Core_ID": 1}])
    update: list = Field(title="修改",
                         default=[
                             {"Core_ID": 1, 'Core_Name': '##', "Belong_Well_Name": '#', 'Fetch_Time': '2023-07-05',
                              'Remark': '#'}])


class UpdateCore(BaseModel):
    add: list = Field(title="添加", default=[
        {'Parameter_Ecode': '##', "Parameter_Name": '#', 'Parameter_UOM_Name': 'dm'}])
    delete: list = Field(title="删除", default=[{"Parameter_Ecode": 1}])
    update: list = Field(title="修改",
                         default=[
                             {'Parameter_Ecode': '##', "Parameter_Name": '#', 'Parameter_UOM_Name': 'dm'}])


class GetWellParam(BaseModel):
    rsvUnits: list = Field(title="储层单元")


class WellParam(BaseModel):
    wellUnits: list = Field(title="井单元")

class CoreDataParam(BaseModel):
    Core_ID: int = Field(title="岩心ID")
    Parameter_ID: int = Field(title="参数ID")
    value: float = Field(title="参数值")
